package com.jie.other.jetpack.room

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey

@Entity(tableName = "user")
data class UserBean(
    // userName字段
    @ColumnInfo(name = "userName") var name: String?,
    // age字段
    @ColumnInfo(name = "age") var age: String?,
    ) {
    // 主键
    @PrimaryKey(autoGenerate = true) var userId: Long = 0
    // 忽略字段
    @Ignore var headPhoto: String? = null

    fun getShowInfo() : String {
        return "$name+$age"
    }
}